KERNEL_DIR      := /usr/src/linux
INSTALL_MOD_DIR	:= drivers/net
PWD		:= $(shell pwd)

obj-m		:= atl2.o
atl2-y		+= atl2_main.o atl2_hw.o atl2_ethtool.o atl2_param.o

all: net_atl2

net_atl2:
	@echo "Building atl2 driver..."
	cd $(KERNEL_DIR) && make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules

clean:
	-rm -f *.o *.ko .*.cmd .*.flags *.mod.c Module.symvers
	-rm -rf .tmp_versions

